<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
MYTCONN(); 
form_pr('get_Data','','','post');
?>
<div class="title">
<table width="100%"  border="0" cellpadding="1" cellspacing="3" bgcolor="#EAEAEA">
  <tr>
    <td height="23">Pedido</td>
    <td>Usuário</td>
    <td>Loja</td>
    <td>Data Pedido</td>
    <td>Estado</td>
    <td>Visita</td>
	<td>Data para Visita</td>	
	<td>Comercial</td>
	<td>Observação Comercial</td>
	
  </tr>
  <?php 
    $Qur = $GLOBALS['MYT']->db_array("SELECT ref, main_users_ref, main_office_ref, Data_Pedido , Estado, Pedido, Data_Visita,Comercial, obs FROM systemoffice.comercial_request
");
  for($a = 1; $a<=$Qur[0]; $a++) { ?> 
    <td><?php echo $Qur[$a]['ref'];?></td>
    <td><?php echo $Qur[$a]['main_users_ref'];?></td>
    <td><?php echo $Qur[$a]['main_office_ref'];?></td>
    <td><?php echo $Qur[$a]['Data_Pedido'];?></td>
    <td><?php echo $Qur[$a]['Estado'];?></td>
    <td><?php echo $Qur[$a]['Pedido'];?></td>
	<td><?php echo $Qur[$a]['Data_Visita'];?></td>
	<td><?php echo $Qur[$a]['Comercial'];?></td>
	<td><?php echo $Qur[$a]['obs'];?></td>

		<td></td>

	</tr>
  <tr><td colspan="10"><hr size="1"></td></tr>
  <?php } ?>
</table>
</div>
</form>

